1800
How can I highlight somehow the child bars of a summary bar

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->Bars->get_Item(TVariant("Task"))->Color = RGB(240,240,240);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long hSummary = var_Items->AddItem(TVariant("Summary"));
	var_Items->AddBar(hSummary,TVariant("Project Summary"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,2).operator double()),TVariant(""),TNoParam());
	long hTask = var_Items->InsertItem(hSummary,TNoParam(),TVariant("Task A"));
	var_Items->AddBar(hTask,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K1"),TNoParam());
	hTask = var_Items->InsertItem(hSummary,TNoParam(),TVariant("Task B"));
	var_Items->AddBar(hTask,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TNoParam());
	hTask = var_Items->InsertItem(hSummary,TNoParam(),TVariant("Task C"));
	var_Items->AddBar(hTask,TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ExpandItem(hSummary,true);
	var_Items->DefineSummaryBars(hSummary,TVariant(""),-1,TVariant("<*>"));
	var_Items->set_ItemBar(hSummary,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exSummaryBarBackColor,TVariant(65536));
	var_Items->set_ItemBar(hSummary,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exSummaryBarBackColorTransparent,TVariant(50));
G2antt1->EndUpdate();

1799
How do I change the color for the selected bars, without showing the frame arround

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,1).operator double()));
	var_Chart->SelBarColor = 0x7f0000ff;
	var_Chart->set_PaneWidth(false,48);
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2002,1,2).operator double()),TVariant(TDateTime(2002,1,4).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2002,1,6).operator double()),TVariant(TDateTime(2002,1,10).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2002,1,11).operator double()),TVariant(TDateTime(2002,1,14).operator double()),TVariant("C"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<A B>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true));
G2antt1->EndUpdate();

1798
Is it possible to enumerate the activities/bars of critical path

// BarResize event - Occurs when a bar is moved or resized.
void __fastcall TForm1::G2antt1BarResize(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Variant   Key)
{
	G2antt1->Items->SchedulePDM(Item,TVariant(Key));
}

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,96);
	var_Chart->Bars->get_Item(TVariant("Task"))->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>"));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long hSummary1 = var_Items->AddItem(TVariant("Summary"));
	var_Items->set_ItemBold(hSummary1,true);
	var_Items->AddBar(hSummary1,TVariant("Summary"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,2).operator double()),TVariant("sum"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(hSummary1,TVariant("sum"),h1,TVariant(""));
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(hSummary1,TVariant("sum"),h2,TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(hSummary1,TVariant("sum"),h3,TVariant(""));
	var_Items->AddLink(TVariant("L2"),h2,TVariant(""),h3,TVariant(""));
	long h4 = var_Items->AddItem(TVariant("Task 4"));
	var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(hSummary1,TVariant("sum"),h4,TVariant(""));
	var_Items->AddLink(TVariant("L3"),h1,TVariant(""),h4,TVariant(""));
	var_Items->set_DefSchedulePDM(Exg2anttlib_tlb::DefSchedulePDMEnum::exPDMCriticalPathBarColor,TVariant(65280));
	var_Items->SchedulePDM(h1,TVariant(""));
G2antt1->EndUpdate();

1797
How can I add a SF link

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,25).operator double()));
	var_Chart->set_PaneWidth(false,48);
	var_Chart->LevelCount = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam());
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K3"),TNoParam());
	long h4 = var_Items->AddItem(TVariant("Task 4"));
	var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K4"),TNoParam());
	long h5 = var_Items->AddItem(TVariant("Task 5"));
	var_Items->AddBar(h5,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K5"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->AddLink(TVariant("L3"),h3,TVariant("K3"),h4,TVariant("K4"));
	var_Items->AddLink(TVariant("L4"),h4,TVariant("K4"),h5,TVariant("K5"));
	var_Items->set_Link(TVariant("L4"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0));
	var_Items->set_Link(TVariant("L4"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2));
	var_Items->set_Link(TVariant("L4"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkColor,TVariant(65280));
	var_Items->SchedulePDM(0,TVariant("K5"));
G2antt1->Chart->ShowLinks = Exg2anttlib_tlb::ShowExtendedLinksEnum::exShowExtendedLinks;
G2antt1->EndUpdate();

1796
How do I get the Start and End date of a bar

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,96);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,24).operator double()),TVariant("K1"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,25).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2006,9,23).operator double()),TVariant(TDateTime(2006,9,26).operator double()),TVariant("K3"),TNoParam());
	long h = var_Items->get_ItemByIndex(1);
	var_Items->set_ItemBold(h,true);
	OutputDebugString( L"Start of " );
	OutputDebugString( PChar(var_Items->get_FirstItemBar(h)) );
	OutputDebugString( PChar(var_Items->get_ItemBar(h,TVariant(var_Items->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarStart)) );
	OutputDebugString( L"End of  " );
	OutputDebugString( PChar(var_Items->get_FirstItemBar(h)) );
	OutputDebugString( PChar(var_Items->get_ItemBar(h,TVariant(var_Items->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarEnd)) );
G2antt1->EndUpdate();

1795
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->FirstWeekDay = var_Chart->LocFirstWeekDay;
	var_Chart->MonthNames = var_Chart->LocMonthNames;
	var_Chart->WeekDays = var_Chart->LocWeekDays;
	var_Chart->AMPM = var_Chart->LocAMPM;
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;

1794
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
G2antt1->EndUpdate();
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExPrint 1.0 Control Library

	TypeLib: ExPrint.dll

	to define the namespace: Exprintlib_tlb
*/
//#include "EXPRINTLIB_TLB.h"
Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print");
	var_Print->Caption = L"This is your new caption for print and print preview";
	var_Print->AutoRelease = false;
	var_Print->PrintExt = (IUnknown*)G2antt1->DefaultDispatch;
	var_Print->Preview();

1793
Is it possible to specify the A4 paper size for the print preview
G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
G2antt1->EndUpdate();
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExPrint 1.0 Control Library

	TypeLib: ExPrint.dll

	to define the namespace: Exprintlib_tlb
*/
//#include "EXPRINTLIB_TLB.h"
Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print");
	var_Print->set_Settings(Exprintlib_tlb::FieldsEnum::exPaperSize,TVariant(9));
	var_Print->AutoRelease = false;
	var_Print->PrintExt = (IUnknown*)G2antt1->DefaultDispatch;
	var_Print->Preview();

1792
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
G2antt1->EndUpdate();
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExPrint 1.0 Control Library

	TypeLib: ExPrint.dll

	to define the namespace: Exprintlib_tlb
*/
//#include "EXPRINTLIB_TLB.h"
Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print");
	var_Print->PageOrientation = Exprintlib_tlb::PageOrientationEnum::exLandscape;
	var_Print->AutoRelease = false;
	var_Print->PrintExt = (IUnknown*)G2antt1->DefaultDispatch;
	var_Print->Preview();

1791
How do I prevent a caption outside the bar from overlapping other bars

G2antt1->BeginUpdate();
G2antt1->ScrollBySingleLine = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,48);
	var_Chart->Bars->Copy(L"Task",L"Default-Task");
	var_Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsIncludeCaption | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TVariant("task"));
	var_Items->set_ItemBar(h,TVariant("A1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A2"),TVariant("task"));
	var_Items->set_ItemBar(h,TVariant("A2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(16));
	h = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h,TVariant("Default-Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TVariant("task"));
	var_Items->set_ItemBar(h,TVariant("A1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
	var_Items->AddBar(h,TVariant("Default-Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A2"),TVariant("task"));
	var_Items->set_ItemBar(h,TVariant("A2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(16));
G2antt1->EndUpdate();

1790
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Clip");
G2antt1->ScrollBySingleLine = true;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->AllowResizeChart = Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartMiddle | Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartHeader;
	var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,23).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,216);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBox;
		var_Bar->Color = RGB(164,164,164);
		var_Bar->StartColor = RGB(240,240,240);
		var_Bar->EndColor = var_Bar->StartColor;
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsIncludeCaption | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->Height = 15;
	var_Chart->MinUnitWidth = var_Chart->UnitWidth;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("no clip, (0-2)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, right(<b>2</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(2));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, center(<b>1</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(1));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TVariant(""));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, left(<b>0</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(0));
	h = var_Items->AddItem(TVariant("clip, inside (3-5)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("clip, inside, right(<b>5</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(5));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("clip, inside, center(<b>4</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(4));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("clip, inside, left(<b>3</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(3));
	h = var_Items->AddItem(TVariant("hide on min width, clip if not fit, inside (6-8)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide on min width, clip if not fit, inside, right(<b>8</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(8));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide on min width, clip if not fit, inside, center(<b>7</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(7));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide on min width, clip if not fit, inside, left(<b>6</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(6));
	h = var_Items->AddItem(TVariant("hide if not fit, no clip, inside (9-11)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide if not fit, no clip, inside, right(<b>11</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(11));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide if not fit, no clip, center(<b>10</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(10));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("hide if not fit, no clip, inside, left(<b>9</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(9));
	h = var_Items->AddItem(TVariant("no clip, inside, outside (12-14)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, inside, outside, right(<b>14</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(14));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, inside, outside, center(<b>13</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(13));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, inside, outside, left(<b>12</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(12));
	h = var_Items->AddItem(TVariant("no clip, outside (16-18)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, outside, right(<b>18</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(18));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, outside, center(<b>17</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(17));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("no clip, outside, left(<b>16</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(16));
G2antt1->EndUpdate();

1789
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(5));
G2antt1->EndUpdate();

1788
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(4));
G2antt1->EndUpdate();

1787
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(3));
G2antt1->EndUpdate();

1786
What options do I have to show the links between bars (straight)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(2));
G2antt1->EndUpdate();

1785
What options do I have to show the links between bars (direct)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(1));
G2antt1->EndUpdate();

1784
What options do I have to show the links between bars (round)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(-1));
G2antt1->EndUpdate();

1783
What options do I have to show the links between bars (rectangular, default)

G2antt1->BeginUpdate();
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,128);
	var_Chart->NonworkingDays = 0;
	var_Chart->LinksWidth = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(""));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,13).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("K3"),TNoParam());
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddItem(TVariant(""));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddItem(TVariant(""));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("<*>"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkShowRound,TVariant(0));
G2antt1->EndUpdate();

1782
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->set_PaneWidth(false,64);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->Copy(L"Progress",L"TProgressD");
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
		var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeThinDown;
	Exg2anttlib_tlb::IBarPtr var_Bar1 = var_Chart->Bars->Copy(L"Progress",L"TProgressC");
		var_Bar1->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
	Exg2anttlib_tlb::IBarPtr var_Bar2 = var_Chart->Bars->Copy(L"Progress",L"TProgressU");
		var_Bar2->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
		var_Bar2->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeThinUp;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TVariant("T1"),TNoParam());
	var_Items->AddBar(h,TVariant("TProgressU"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,10,4).operator double()),TVariant("TP1"),TNoParam());
	var_Items->GroupBars(h,TVariant("T1"),true,h,TVariant("TP1"),true,TVariant(3),TNoParam());
	var_Items->set_ItemBar(h,TVariant("TP1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<font ;6>progress up"));
	h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,10,1).operator double()),TVariant("T2"),TNoParam());
	var_Items->AddBar(h,TVariant("TProgressC"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,10,5).operator double()),TVariant("TP2"),TNoParam());
	var_Items->GroupBars(h,TVariant("T2"),true,h,TVariant("TP2"),true,TVariant(3),TNoParam());
	var_Items->set_ItemBar(h,TVariant("TP2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<font ;6>progress center"));
	h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(h,TVariant("TProgressD"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,10,6).operator double()),TVariant("TP3"),TNoParam());
	var_Items->GroupBars(h,TVariant("T3"),true,h,TVariant("TP3"),true,TVariant(3),TNoParam());
	var_Items->set_ItemBar(h,TVariant("TP3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<font ;6>progress down"));
G2antt1->EndUpdate();

1781
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)

G2antt1->BeginUpdate();
G2antt1->MarkSearchColumn = false;
G2antt1->Indent = 11;
G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exSolidLine;
G2antt1->Items->AllowCellValueToItemBar = true;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(544));
		var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
		var_Column->set_LevelKey(TVariant(1));
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(546));
		var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
		var_Column1->set_LevelKey(TVariant(1));
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->AllowLinkBars = false;
	var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar;
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,224);
	Exg2anttlib_tlb::IBarsPtr var_Bars = var_Chart->Bars;
		Exg2anttlib_tlb::IBarPtr var_Bar = var_Bars->Add(L"Underline");
			var_Bar->Color = RGB(0,0,255);
			var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeThinDown;
		Exg2anttlib_tlb::IBarPtr var_Bar1 = var_Bars->Add(L"Task:Underline");
			var_Bar1->Shortcut = L"T";
			var_Bar1->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Project"));
	var_Items->AddBar(h,TVariant("Summary"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,10,3).operator double()),TNoParam(),TNoParam());
	long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("T"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,24).operator double()),TNoParam(),TNoParam());
	long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("T"),TVariant(TDateTime(2006,9,24).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("T"),TVariant(TDateTime(2006,9,28).operator double()),TVariant(TDateTime(2006,10,3).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(h,TVariant(""),h1,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h2,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h3,TVariant(""));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(h,true);
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveStart,TVariant(TDateTime(2006,9,22).operator double()));
G2antt1->EndUpdate();

1780
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

G2antt1->BeginUpdate();
G2antt1->MarkSearchColumn = false;
G2antt1->Indent = 11;
G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exSolidLine;
G2antt1->Items->AllowCellValueToItemBar = true;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(544));
		var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
		var_Column->set_LevelKey(TVariant(1));
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(545));
		var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
		var_Column1->set_LevelKey(TVariant(1));
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->AllowLinkBars = false;
	var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar;
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,224);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Project"));
	var_Items->AddBar(h,TVariant("Summary"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,10,3).operator double()),TNoParam(),TNoParam());
	long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,24).operator double()),TNoParam(),TNoParam());
	long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,24).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2006,9,28).operator double()),TVariant(TDateTime(2006,10,3).operator double()),TNoParam(),TNoParam());
	var_Items->DefineSummaryBars(h,TVariant(""),h1,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h2,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h3,TVariant(""));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(h,true);
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveStart,TVariant(TDateTime(2006,9,22).operator double()));
G2antt1->EndUpdate();

1779
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<A*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEndInclusive,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1778
Is it possible to programmatically move all bars to end at specified date (inclusive)

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEndInclusive,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1777
Is it possible to programmatically move all bars of specified key to end at specified date

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<A*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEnd,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1776
Is it possible to programmatically move all bars to end at specified date

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEnd,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1775
Is it possible to programmatically move all bars of specified key to start at specified date

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<A*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveStart,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1774
Is it possible to programmatically move all bars to start at specified date

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveStart,TVariant(TDateTime(2001,1,2).operator double()));
G2antt1->EndUpdate();

1773
Is it possible to programmatically move all bars of specified key

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<A*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMove,TVariant(2));
G2antt1->EndUpdate();

1772
Is it possible to programmatically move all bars

G2antt1->BeginUpdate();
G2antt1->Debug = true;
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.1")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task A.2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("B"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task B.2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TNoParam());
	var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMove,TVariant(2));
G2antt1->EndUpdate();

1771
How can I programmatically move a bar, so it ends at specified date (inclusive)
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEndInclusive,TVariant(TDateTime(2001,1,4).operator double()));

1770
How can I programmatically move a bar, so it ends at specified date
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveEnd,TVariant(TDateTime(2001,1,4).operator double()));

1769
How can I programmatically move a bar, so it starts at specified date
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMoveStart,TVariant(TDateTime(2001,1,4).operator double()));

1768
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom

G2antt1->BeginUpdate();
G2antt1->HeaderHeight = 22;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2016,1,1).operator double()));
	var_Chart->set_PaneWidth(false,0);
	var_Chart->LevelCount = 2;
	var_Chart->DrawLevelSeparator = Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine;
	var_Chart->AllowResizeChart = Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartMiddle | Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartHeader;
	var_Chart->MaxUnitWidth = 196;
	Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0);
		var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::exHOutside | Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine;
	Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1);
		var_Level1->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelMiddleLine | Exg2anttlib_tlb::LevelLineEnum::exLevelDotLine;
		var_Level1->DrawTickLinesFrom(0,Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine);
		var_Level1->BackColor = RGB(240,240,240);
	var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewShowAllVisible;
	var_Chart->AllowOverviewZoom = Exg2anttlib_tlb::OverviewZoomEnum::exAlwaysZoom;
	var_Chart->UnitWidth = 24;
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exWeek,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exDay,TVariant(String("<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><o") +
"ff -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096"));
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;
	var_Chart->ScrollTo(var_Chart->get_FirstVisibleDate(),TVariant(1));
G2antt1->Columns->Add(L"Default");
G2antt1->EndUpdate();

1767
Can I use GroupBars with OverlaidType method

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
G2antt1->Debug = true;
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
G2antt1->ScrollBySingleLine = true;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->set_PaneWidth(false,96);
	var_Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Project"));
	var_Items->AddBar(h,TVariant("Summary"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,10,4).operator double()),TNoParam(),TNoParam());
	long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Tasks"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,26).operator double()),TVariant("h1"),TNoParam());
	String h2 = h1;
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TVariant("h2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("h1"),h2,TVariant("h2"));
	String h3 = h1;
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2006,9,29).operator double()),TVariant(TDateTime(2006,10,4).operator double()),TVariant("h3"),TNoParam());
	var_Items->AddLink(TVariant("L2"),h2,TVariant("h2"),h3,TVariant("h3"));
	var_Items->DefineSummaryBars(h,TVariant(""),h1,TVariant("h1"));
	var_Items->DefineSummaryBars(h,TVariant(""),h2,TVariant("h2"));
	var_Items->DefineSummaryBars(h,TVariant(""),h3,TVariant("h3"));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(h,true);
	var_Items->GroupBars(h1,TVariant("h1"),false,h2,TVariant("h2"),true,TVariant(31),TVariant("0;5;-1"));
	var_Items->GroupBars(h2,TVariant("h2"),false,h3,TVariant("h3"),true,TVariant(31),TVariant("0;5;-1"));
G2antt1->EndUpdate();

1766
How do I change the link's lag so I can schedule bars to start later (with nonworking part)

// BarResizing event - Occurs when a bar is moving or resizing.
void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Variant   Key)
{
	G2antt1->Items->SchedulePDM(Item,TVariant(Key));
}

G2antt1->BeginUpdate();
G2antt1->DefaultItemHeight = 22;
G2antt1->HeaderHeight = G2antt1->DefaultItemHeight;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LinksStyle = Exg2anttlib_tlb::LinkStyleEnum::exLinkSolid;
	var_Chart->LinksColor = RGB(128,128,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double()));
	var_Chart->set_PaneWidth(false,48);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
		var_Bar->Color = RGB(0,0,0);
		var_Bar->StartColor = RGB(190,190,190);
		var_Bar->EndColor = var_Bar->StartColor;
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBox;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K1"),TVariant("FS lag=0 (default)"));
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TVariant("FS lag=4"));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K3"),TVariant("FS lag=-1"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMWorkingDelay,TVariant(4));
	long h4 = var_Items->AddItem(TVariant("Task 4"));
	var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K4"),TNoParam());
	var_Items->AddLink(TVariant("L3"),h3,TVariant("K3"),h4,TVariant("K4"));
	var_Items->set_Link(TVariant("L3"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMWorkingDelay,TVariant(-1));
	var_Items->SchedulePDM(0,TVariant("K1"));
G2antt1->EndUpdate();

1765
How do I change the link's lag so I can schedule bars to start later (without nonworking part)

// BarResizing event - Occurs when a bar is moving or resizing.
void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Variant   Key)
{
	G2antt1->Items->SchedulePDM(Item,TVariant(Key));
}

G2antt1->BeginUpdate();
G2antt1->DefaultItemHeight = 22;
G2antt1->HeaderHeight = G2antt1->DefaultItemHeight;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
G2antt1->AntiAliasing = true;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LinksStyle = Exg2anttlib_tlb::LinkStyleEnum::exLinkSolid;
	var_Chart->LinksColor = RGB(128,128,128);
	var_Chart->LevelCount = 2;
	var_Chart->NonworkingDays = 0;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double()));
	var_Chart->set_PaneWidth(false,48);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
		var_Bar->Color = RGB(0,0,0);
		var_Bar->StartColor = RGB(190,190,190);
		var_Bar->EndColor = var_Bar->StartColor;
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBox;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K1"),TVariant("FS lag=0 (default)"));
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TVariant("FS lag=4"));
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	long h3 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K3"),TVariant("FS lag=-1"));
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMDelay,TVariant(4));
	long h4 = var_Items->AddItem(TVariant("Task 4"));
	var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K4"),TNoParam());
	var_Items->AddLink(TVariant("L3"),h3,TVariant("K3"),h4,TVariant("K4"));
	var_Items->set_Link(TVariant("L3"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMDelay,TVariant(-1));
	var_Items->SchedulePDM(0,TVariant("K1"));
G2antt1->EndUpdate();

1764
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// MouseDown event - Occurs when the user presses a mouse button.
void __fastcall TForm1::G2antt1MouseDown(TObject *Sender,short   Button,short   Shift,int   X,int   Y)
{
	long i = G2antt1->ItemFromPoint[-1,-1,c,hit];
	G2antt1->FullRowSelect = G2antt1->Columns->get_Item(TVariant(c))->get_Data();
}

G2antt1->BeginUpdate();
G2antt1->HeaderHeight = 22;
G2antt1->HeaderAppearance = Exg2anttlib_tlb::AppearanceEnum::Flat;
G2antt1->BackColorLock = RGB(240,240,240);
G2antt1->BackColorHeader = G2antt1->BackColorLock;
G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exNoLine;
G2antt1->ColumnAutoResize = false;
G2antt1->SortBarVisible = false;
G2antt1->AllowGroupBy = true;
G2antt1->ReadOnly = Exg2anttlib_tlb::ReadOnlyEnum::exReadOnly;
G2antt1->ShowFocusRect = false;
G2antt1->CountLockedColumns = 1;
G2antt1->AutoDrag = Exg2anttlib_tlb::AutoDragEnum::exAutoDragScroll;
G2antt1->SingleSort = false;
G2antt1->ColumnsAllowSizing = true;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
G2antt1->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesSolid;
G2antt1->GridLineColor = RGB(220,220,220);
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->LevelCount = 2;
G2antt1->Chart->set_PaneWidth(false,256);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Columns->get_Item(TVariant(0))->set_Data(TVariant(-1));
G2antt1->Layout = L"singlesort=\"C5:1\";multiplesort=\" C1:2\"";
G2antt1->EndUpdate();

1763
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void __fastcall TForm1::G2antt1BeforeExpandItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Variant *   Cancel)
{
	G2antt1->EventParam[1] = TVariant(true);
}

// Event event - Notifies the application once the control fires an event.
void __fastcall TForm1::G2antt1Event(TObject *Sender,long   EventID)
{
	OutputDebugString( PChar(G2antt1->EventParam[-2]) );
}

G2antt1->BeginUpdate();
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
G2antt1->Columns->Add(L"Default");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Root A"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root B"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
G2antt1->EndUpdate();

1762
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->MarkSelectDateColor = var_Chart->BackColor;
	var_Chart->MarkTodayColor = var_Chart->BackColor;
G2antt1->EndUpdate();

1761
Is it possible to search for a bar through items only ( not including the locked items )

G2antt1->BeginUpdate();
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,12,31).operator double()));
G2antt1->BackColorAlternate = RGB(250,250,250);
G2antt1->ShowLockedItems = true;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Find");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
	var_Column->Visible = false;
	var_Column->FormatColumn = L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ";
G2antt1->Chart->ColumnsFormatLevel = L"1";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exTop,3);
	long h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,0);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T1"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T2"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,2);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 1")),TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 2")),TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T4"),TNoParam());
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,3);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,0);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T5"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,2);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T6"),TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items;
	h = var_Items1->get_FindBar(TVariant("T4"),TVariant(0));
	var_Items1->set_ItemBar(h,TVariant(var_Items1->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items1->set_CellValue(TVariant(h),TVariant(1),TVariant(h));
G2antt1->EndUpdate();

1760
Is it possible to search for a bar through bottom-locked-items only

G2antt1->BeginUpdate();
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,12,31).operator double()));
G2antt1->BackColorAlternate = RGB(250,250,250);
G2antt1->ShowLockedItems = true;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Find");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
	var_Column->Visible = false;
	var_Column->FormatColumn = L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ";
G2antt1->Chart->ColumnsFormatLevel = L"1";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exTop,3);
	long h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,0);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T1"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T2"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,2);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 1")),TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 2")),TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T4"),TNoParam());
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,3);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,0);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T5"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,2);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T6"),TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items;
	h = var_Items1->get_FindBar(TVariant("T6"),TVariant(-4));
	var_Items1->set_ItemBar(h,TVariant(var_Items1->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items1->set_CellValue(TVariant(h),TVariant(1),TVariant(h));
G2antt1->EndUpdate();

1759
Is it possible to search for a bar through top-locked-items only

G2antt1->BeginUpdate();
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,12,31).operator double()));
G2antt1->BackColorAlternate = RGB(250,250,250);
G2antt1->ShowLockedItems = true;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Find");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
	var_Column->Visible = false;
	var_Column->FormatColumn = L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ";
G2antt1->Chart->ColumnsFormatLevel = L"1";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exTop,3);
	long h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,0);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T1"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T2"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,2);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 1")),TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 2")),TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T4"),TNoParam());
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,3);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,0);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T5"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,2);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T6"),TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items;
	h = var_Items1->get_FindBar(TVariant("T1"),TVariant(-3));
	var_Items1->set_ItemBar(h,TVariant(var_Items1->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items1->set_CellValue(TVariant(h),TVariant(1),TVariant(h));
G2antt1->EndUpdate();

1758
Is it possible to search for a bar through all locked-items only

G2antt1->BeginUpdate();
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,12,31).operator double()));
G2antt1->BackColorAlternate = RGB(250,250,250);
G2antt1->ShowLockedItems = true;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Find");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
	var_Column->Visible = false;
	var_Column->FormatColumn = L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ";
G2antt1->Chart->ColumnsFormatLevel = L"1";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exTop,3);
	long h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,0);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T1"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T2"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,2);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 1")),TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 2")),TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T4"),TNoParam());
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,3);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,0);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T5"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,2);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T6"),TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items;
	h = var_Items1->get_FindBar(TVariant("T2"),TVariant(-2));
	var_Items1->set_ItemBar(h,TVariant(var_Items1->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items1->set_CellValue(TVariant(h),TVariant(1),TVariant(h));
G2antt1->EndUpdate();

1757
Is it possible to search for a bar through all items ( including locked items )

G2antt1->BeginUpdate();
G2antt1->Debug = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,12,31).operator double()));
G2antt1->BackColorAlternate = RGB(250,250,250);
G2antt1->ShowLockedItems = true;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Find");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
	var_Column->Visible = false;
	var_Column->FormatColumn = L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ";
G2antt1->Chart->ColumnsFormatLevel = L"1";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exTop,3);
	long h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,0);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T1"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-top 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T2"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exTop,2);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 1")),TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T3"),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("un-locked item 2")),TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T4"),TNoParam());
	var_Items->set_LockedItemCount(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,3);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,0);
	var_Items->set_SelectItem(h,false);
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemHeight(h,2);
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,1);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,4).operator double()),TVariant(TDateTime(2016,1,8).operator double()),TVariant("T5"),TNoParam());
	h = var_Items->get_LockedItem(Exg2anttlib_tlb::VAlignmentEnum::exMiddle,2);
	var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant("locked-bottom 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2016,1,5).operator double()),TVariant(TDateTime(2016,1,9).operator double()),TVariant("T6"),TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items;
	h = var_Items1->get_FindBar(TVariant("T5"),TVariant(-1));
	var_Items1->set_ItemBar(h,TVariant(var_Items1->get_FirstItemBar(h)),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items1->set_CellValue(TVariant(h),TVariant(1),TVariant(h));
G2antt1->EndUpdate();

1756
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Clip");
G2antt1->ScrollBySingleLine = true;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->AllowResizeChart = Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartMiddle | Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartHeader;
	var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,23).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,216);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBox;
		var_Bar->Color = RGB(164,164,164);
		var_Bar->StartColor = RGB(240,240,240);
		var_Bar->EndColor = var_Bar->StartColor;
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsIncludeCaption | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->Height = 15;
	var_Chart->MinUnitWidth = var_Chart->UnitWidth;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("no clip, (0-2)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("no clip, right(<b>2</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(2));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TVariant("no clip, center(<b>1</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(1));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TVariant("no clip, left(<b>0</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(0));
	h = var_Items->AddItem(TVariant("clip, inside (3-5)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TVariant("clip, inside, right(<b>5</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(5));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TVariant("clip, inside, center(<b>4</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(4));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TVariant("clip, inside, left(<b>3</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(3));
	h = var_Items->AddItem(TVariant("hide on min width, clip if not fit, inside (6-8)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K1"),TVariant("hide on min width, clip if not fit, inside, right(<b>8</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(8));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K2"),TVariant("hide on min width, clip if not fit, inside, center(<b>7</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(7));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,26).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TVariant("hide on min width, clip if not fit, inside, left(<b>6</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(6));
	h = var_Items->AddItem(TVariant("hide if not fit, no clip, inside (9-11)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TVariant("hide if not fit, no clip, inside, right(<b>11</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(11));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TVariant("hide if not fit, no clip, center(<b>10</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(10));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TVariant("hide if not fit, no clip, inside, left(<b>9</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(9));
	h = var_Items->AddItem(TVariant("no clip, inside, outside (12-14)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TVariant("no clip, inside, outside, right(<b>14</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(14));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K2"),TVariant("no clip, inside, outside, center(<b>13</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(13));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,28).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K3"),TVariant("no clip, inside, outside, left(<b>12</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(12));
	h = var_Items->AddItem(TVariant("no clip, outside (16-18)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TVariant("no clip, outside, right(<b>18</b>)"));
	var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TVariant("no clip, outside, center(<b>17</b>)"));
	var_Items->set_ItemBar(h,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(17));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,30).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TVariant("no clip, outside, left(<b>16</b>)"));
	var_Items->set_ItemBar(h,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(16));
G2antt1->EndUpdate();

1755
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
// DateChange event - Occurs when the first visible date is changed.
void __fastcall TForm1::G2antt1DateChange(TObject *Sender)
{
	G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
}

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1[bg=12500670]:52,|,2[bg=12500670]:52";
	var_Chart->ColumnsTransparent = 50;
	var_Chart->ScrollBar = false;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1754
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
// BarResizing event - Occurs when a bar is moving or resizing.
void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Variant   Key)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->set_ItemBar(Item,TVariant(Key),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMinStart,TVariant(TDateTime(2001,1,1).operator double()));
		var_Items->set_ItemBar(Item,TVariant(Key),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMaxEnd,TVariant(TDateTime(2001,2,1).operator double()));
}

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1[bg=12500670]:52,|,2[bg=12500670]:52";
	var_Chart->ColumnsTransparent = 50;
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exStartDate,TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exEndDate,TVariant(TDateTime(2001,1,31).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1753
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1[bg=12500670]:52,|,2[bg=12500670]:52";
	var_Chart->ColumnsTransparent = 50;
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exStartDate,TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exEndDate,TVariant(TDateTime(2001,1,31).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1752
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0));
G2antt1->EndUpdate();
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExPrint 1.0 Control Library

	TypeLib: ExPrint.dll

	to define the namespace: Exprintlib_tlb
*/
//#include "EXPRINTLIB_TLB.h"
Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print");
	OutputDebugString( var_Print->Version );
	var_Print->Foreground = -1;
	var_Print->PrintExt = (IUnknown*)G2antt1->DefaultDispatch;
	var_Print->Preview();

1751
The week number is not correct (wrong). What can I do

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->FirstWeekDay = var_Chart->LocFirstWeekDay;
	var_Chart->MonthNames = var_Chart->LocMonthNames;
	var_Chart->WeekDays = var_Chart->LocWeekDays;
	var_Chart->AMPM = var_Chart->LocAMPM;
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exWeek;
	var_Chart->UnitWidth = 32;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2016,1,1).operator double()));
	var_Chart->AdjustLevelsToBase = true;
	var_Chart->WeekNumberAs = Exg2anttlib_tlb::WeekNumberAsEnum::exISO8601WeekNumber;
	var_Chart->ShowNonworkingDates = false;
	var_Chart->ScrollTo(var_Chart->get_FirstVisibleDate(),TVariant(1));

1750
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
// ChartEndChanging event - Occurs after the chart has been changed.
void __fastcall TForm1::G2antt1ChartEndChanging(TObject *Sender,Exg2anttlib_tlb::BarOperationEnum   Operation)
{
	Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
		OutputDebugString( L"FirstVisibleDate" );
		OutputDebugString( PChar(var_Chart->get_FirstVisibleDate()) );
		OutputDebugString( L"UnitScale" );
		OutputDebugString( PChar(var_Chart->UnitScale) );
		OutputDebugString( L"UnitWidth" );
		OutputDebugString( PChar(var_Chart->UnitWidth) );
}

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 3;
	var_Chart->AllowResizeChart = Exg2anttlib_tlb::ResizeChartEnum::exAllowChangeUnitScale | Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartMiddle | Exg2anttlib_tlb::ResizeChartEnum::exAllowResizeChartHeader;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->MarkTodayColor = var_Chart->BackColor;
G2antt1->EndUpdate();

1749
The first week number is not correctly assigned. What can I do

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2016,1,1).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday;
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exWeek;
	var_Chart->ScrollTo(var_Chart->get_FirstVisibleDate(),TVariant(1));
	var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
	var_Chart->AdjustLevelsToBase = true;
	var_Chart->get_Level(0)->set_Label(TVariant("<c><%mmmm%>"));

1748
How can I display the +/- expand - collapse buttons, a bit larger

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(3,TVariant("c:\\exontrol\\images\\normal.ebn"));
	var_Appearance->Add(4,TVariant("c:\\exontrol\\images\\pushed.ebn"));
	var_Appearance->Add(1,TVariant("CP:3 -4 -4 4 4"));
	var_Appearance->Add(2,TVariant("CP:4 -4 -4 4 4"));
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exGroupLinesAtRoot;
G2antt1->HasButtons = Exg2anttlib_tlb::ExpandButtonEnum::exCustom;
G2antt1->HasButtonsCustom[false] = 16777216;
G2antt1->HasButtonsCustom[true] = 33554432;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child"));
G2antt1->EndUpdate();

1747
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
void __fastcall TForm1::G2antt1AllowAutoDrag(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,Exg2anttlib_tlb::HITEM   NewParent,Exg2anttlib_tlb::HITEM   InsertA,Exg2anttlib_tlb::HITEM   InsertB,VARIANT_BOOL *   Cancel)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		OutputDebugString( L"NewParent" );
		OutputDebugString( var_Items->get_CellCaption(TVariant(NewParent),TVariant(0)) );
		OutputDebugString( L"After" );
		OutputDebugString( var_Items->get_CellCaption(TVariant(InsertA),TVariant(0)) );
		OutputDebugString( L"Before" );
		OutputDebugString( var_Items->get_CellCaption(TVariant(InsertB),TVariant(0)) );
	Cancel = true;
}

G2antt1->BeginUpdate();
G2antt1->AutoDrag = Exg2anttlib_tlb::AutoDragEnum::exAutoDragPositionAny;
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exNoLinesAtRoot;
G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exThinLine;
G2antt1->ShowFocusRect = false;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->ShowNonworkingDates = false;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,29).operator double()));
	var_Chart->set_PaneWidth(false,96);
	var_Chart->LevelCount = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Group 1"));
	var_Items->set_ItemDivider(h,0);
	var_Items->set_ItemBold(h,true);
	long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam());
	long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2"));
	var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2"));
	var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("L1"));
	long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3"));
	var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam());
	var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3"));
	var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("L2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Group 2"));
	var_Items->set_ItemBold(h,true);
	var_Items->set_ItemDivider(h,0);
G2antt1->EndUpdate();

1746
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1[bg=12500670]:52,|,2[bg=12500670]:52";
	var_Chart->ColumnsTransparent = 50;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1745
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,2).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1[bg=12500670]:52,|,2[bg=12500670]:52";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1744
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Start");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
	var_Column->Visible = false;
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::LeftAlignment;
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellBackColor,TVariant(12500670));
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"End");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
	var_Column1->Visible = false;
	var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellBackColor,TVariant(12500670));
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,31).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,48);
	var_Chart->ColumnsFormatLevel = L"1:52,|,2:52";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1743
How can I display the control's content on an single A3 paper size, when using PDF format

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->AntiAliasing = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,24).operator double()));
	var_Chart->set_PaneWidth(false,96);
	var_Chart->LevelCount = 2;
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
		var_Bar->Color = RGB(0,0,0);
		var_Bar->Height = 16;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,25).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("1"),TVariant("<fgcolor=FFFFFF>Center"));
	var_Items->set_ItemBar(h,TVariant("1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("left"));
	var_Items->set_ItemBar(h,TVariant("1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(16));
	h = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,16).operator double()),TVariant("1"),TVariant("<fgcolor=FFFFFF>Center"));
	h = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,16).operator double()),TVariant(TDateTime(2001,1,26).operator double()),TVariant("2"),TVariant("Center"));
	var_Items->set_ItemBar(h,TVariant("2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("right"));
	var_Items->set_ItemBar(h,TVariant("2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(18));
Exg2anttlib_tlb::INotesPtr var_Notes = G2antt1->Chart->Notes;
	Exg2anttlib_tlb::INotePtr var_Note = var_Notes->Add(TVariant("1S"),TVariant(G2antt1->Items->get_ItemByIndex(1)),TVariant("1"),L"<%m3%>-<%d%>");
		var_Note->set_PartShadow(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,false);
		var_Note->set_PartHOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,-16);
		var_Note->set_PartVOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,4);
	Exg2anttlib_tlb::INotePtr var_Note1 = var_Notes->Add(TVariant("1F"),TVariant(G2antt1->Items->get_ItemByIndex(1)),TVariant("1"),L"<%m3%>-<%d%>");
		var_Note1->set_RelativePosition(TVariant(1));
		var_Note1->set_PartShadow(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,false);
		var_Note1->set_PartHOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,16);
		var_Note1->set_PartVOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,-4);
TVariant var_CopyTo = TVariant(G2antt1->CopyTo[L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in||single"]);
OutputDebugString( L"Look for C:\\Temp\\Preview.pd file." );
G2antt1->EndUpdate();

1742
How can I display the control's content on an A3 paper size, when using PDF format

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Task");
G2antt1->AntiAliasing = true;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,24).operator double()));
	var_Chart->set_PaneWidth(false,96);
	var_Chart->LevelCount = 2;
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
		var_Bar->Color = RGB(0,0,0);
		var_Bar->Height = 16;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2000,12,25).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("1"),TVariant("<fgcolor=FFFFFF>Center"));
	var_Items->set_ItemBar(h,TVariant("1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("left"));
	var_Items->set_ItemBar(h,TVariant("1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(16));
	h = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,16).operator double()),TVariant("1"),TVariant("<fgcolor=FFFFFF>Center"));
	h = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,16).operator double()),TVariant(TDateTime(2001,1,26).operator double()),TVariant("2"),TVariant("Center"));
	var_Items->set_ItemBar(h,TVariant("2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaption,TVariant("right"));
	var_Items->set_ItemBar(h,TVariant("2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarExtraCaptionHAlign,TVariant(18));
Exg2anttlib_tlb::INotesPtr var_Notes = G2antt1->Chart->Notes;
	Exg2anttlib_tlb::INotePtr var_Note = var_Notes->Add(TVariant("1S"),TVariant(G2antt1->Items->get_ItemByIndex(1)),TVariant("1"),L"<%m3%>-<%d%>");
		var_Note->set_PartShadow(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,false);
		var_Note->set_PartHOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,-16);
		var_Note->set_PartVOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,4);
	Exg2anttlib_tlb::INotePtr var_Note1 = var_Notes->Add(TVariant("1F"),TVariant(G2antt1->Items->get_ItemByIndex(1)),TVariant("1"),L"<%m3%>-<%d%>");
		var_Note1->set_RelativePosition(TVariant(1));
		var_Note1->set_PartShadow(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,false);
		var_Note1->set_PartHOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,16);
		var_Note1->set_PartVOffset(Exg2anttlib_tlb::NotePartEnum::exNoteEnd,-4);
TVariant var_CopyTo = TVariant(G2antt1->CopyTo[L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in"]);
OutputDebugString( L"Look for C:\\Temp\\Preview.pd file." );
G2antt1->EndUpdate();

1741
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->set_ItemBold(Item,true);
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

G2antt1->BeginUpdate();
G2antt1->AllowGroupBy = true;
G2antt1->SortBarVisible = true;
G2antt1->MarkSearchColumn = false;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
		var_Column->AllowGroupBy = false;
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
		var_Column1->AllowGroupBy = false;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,256);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("1")),TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,27).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("1")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("2")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("2")),TVariant("Task"),TVariant(TDateTime(2006,9,23).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("3")),TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("3")),TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TNoParam(),TNoParam());
Exg2anttlib_tlb::IColumnPtr var_Column2 = G2antt1->Columns->Add(L"Tasks - Group");
	var_Column2->Visible = false;
	var_Column2->FormatColumn = L"%0 in (1,2) ? `1 - 2` : `3 -`";
	var_Column2->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1740
How can I filter the chart and its content, not the items section

// RClick event - Fired when right mouse button is clicked
void __fastcall TForm1::G2antt1RClick(TObject *Sender)
{
	G2antt1->Columns->get_Item(TVariant("Start"))->ShowFilter(TVariant("-1,-1,128,128"));
}

G2antt1->BeginUpdate();
G2antt1->SortBarVisible = true;
G2antt1->MarkSearchColumn = false;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
		var_Column->DisplayFilterDate = true;
		var_Column->DisplayFilterPattern = false;
		var_Column->FilterList = Exg2anttlib_tlb::FilterListEnum::exShowExclude | Exg2anttlib_tlb::FilterListEnum::exShowCheckBox;
		var_Column->Visible = false;
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
		var_Column1->DisplayFilterDate = true;
		var_Column1->DisplayFilterPattern = false;
		var_Column1->Visible = false;
		var_Column1->FilterList = Exg2anttlib_tlb::FilterListEnum::exShowExclude | Exg2anttlib_tlb::FilterListEnum::exShowCheckBox;
		var_Column1->Visible = false;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,128);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,27).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2006,9,23).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 5")),TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 6")),TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1739
How do I enable the Group-By feature

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->set_ItemBackColor(Item,RGB(240,240,240));
		G2antt1->Chart->set_ItemBackColor(Item,RGB(240,240,240));
		var_Items->set_ItemDividerLine(Item,Exg2anttlib_tlb::DividerLineEnum::EmptyLine);
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

G2antt1->BeginUpdate();
G2antt1->AllowGroupBy = true;
G2antt1->SortBarVisible = true;
G2antt1->MarkSearchColumn = false;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
		var_Column->AllowGroupBy = false;
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
		var_Column1->AllowGroupBy = false;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,256);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,27).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,28).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2006,9,23).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2006,9,25).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,30).operator double()),TNoParam(),TNoParam());
G2antt1->Columns->get_Item(TVariant(0))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1738
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)

// SelectionChanged event - Fired after a new item has been selected.
void __fastcall TForm1::G2antt1SelectionChanged(TObject *Sender)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		OutputDebugString( var_Items->get_CellCaption(TVariant(var_Items->FocusItem),TVariant(0)) );
		OutputDebugString( PChar(var_Items->get_ItemBar(var_Items->FocusItem,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarWorkingCount)) );
}

G2antt1->BeginUpdate();
G2antt1->SelBackColor = RGB(142,190,255);
G2antt1->SelForeColor = RGB(0,0,0);
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,96);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,1).operator double()));
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->Add(L"Task:Split");
		var_Bar->Shortcut = L"Task";
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<%=%258%><font ;6><off 3>w/units"));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
	var_Chart->SelBackColor = G2antt1->SelBackColor;
G2antt1->Columns->Add(L"Task");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task A"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,2).operator double()),TVariant(TDateTime(2002,1,9).operator double()),TNoParam(),TNoParam());
	h = var_Items->AddItem(TVariant("Task B"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,3).operator double()),TVariant(TDateTime(2002,1,8).operator double()),TNoParam(),TNoParam());
	var_Items->set_SelectItem(h,true);
	h = var_Items->AddItem(TVariant("Task C"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,5).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1737
How do i verify weather specified unit is Nonworking Working Unit

// MouseMove event - Occurs when the user moves the mouse.
void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short   Button,short   Shift,int   X,int   Y)
{
	long h = G2antt1->ItemFromPoint[-1,-1,c,hit];
	Date d = G2antt1->Chart->get_DateFromPoint(-1,-1);
	OutputDebugString( L"d" );
	OutputDebugString( PChar(G2antt1->Chart->get_IsNonworkingDate(TVariant(d),TVariant(h))) );
}

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"NonWorking");
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,24).operator double()));
	var_Chart->set_PaneWidth(false,64);
	var_Chart->LevelCount = 2;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Default"));
	h = var_Items->AddItem(TVariant("January"));
	var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"month(value) = 1");
	h = var_Items->AddItem(TVariant("February, Saturday, Sunday"));
	var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)");
	h = var_Items->AddItem(TVariant("Sunday"));
	var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) = 0");
G2antt1->EndUpdate();

1736
How can I specify the bar's caption to be caption from a column/cell

// Change event - Occurs when the user changes the cell's content.
void __fastcall TForm1::G2antt1Change(TObject *Sender,Exg2anttlib_tlb::HITEM   Item,long   ColIndex,Variant *   NewValue)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->set_PaneWidth(false,64);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("<fgcolor=808080><%=%C0%>"));
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18));
Exg2anttlib_tlb::IEditorPtr var_Editor = G2antt1->Columns->Add(L"Task")->Editor;
	var_Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DropDownListType;
	var_Editor->AddItem(1,L"Aka",TNoParam());
	var_Editor->AddItem(2,L"Baka",TNoParam());
	var_Editor->AddItem(3,L"Taka",TNoParam());
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant(1)),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant(2)),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant(3)),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1735
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Tasks");
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Effort");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(21));
	var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 2;
	var_Chart->NonworkingDays = 0;
	var_Chart->set_PaneWidth(false,96);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double()));
	var_Chart->HistogramVisible = true;
	var_Chart->HistogramHeight = 128;
	var_Chart->HistogramView = Exg2anttlib_tlb::HistogramViewEnum::exHistogramAllItems;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->HistogramPattern = var_Bar->Pattern;
		var_Bar->HistogramType = Exg2anttlib_tlb::HistogramTypeEnum::exHistOverload;
		var_Bar->HistogramCriticalValue = 3;
		var_Bar->ShowHistogramValues = L"value>3?255:1";
		var_Bar->HistogramItems = -11;
		var_Bar->HistogramGridLinesColor = RGB(192,192,192);
		var_Bar->HistogramRulerLinesColor = RGB(0,0,1);
		var_Bar->FormatHistogramValues = L"(value format `0`) + ` units`";
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	long h1 = var_Items->AddItem(TVariant("Task 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2005,6,21).operator double()),TVariant(TDateTime(2005,6,23).operator double()),TNoParam(),TNoParam());
	var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(6.79));
	h1 = var_Items->AddItem(TVariant("Task 2"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2005,6,24).operator double()),TVariant(TDateTime(2005,6,26).operator double()),TNoParam(),TNoParam());
	var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(3.19));
	h1 = var_Items->AddItem(TVariant("Task 3"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2005,6,27).operator double()),TVariant(TDateTime(2005,6,29).operator double()),TNoParam(),TNoParam());
	var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(2));
	h1 = var_Items->AddItem(TVariant("Task 4"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2005,6,30).operator double()),TVariant(TDateTime(2005,7,2).operator double()),TNoParam(),TNoParam());
	var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(1));
G2antt1->EndUpdate();

1734
How can I create a relative time-scale

G2antt1->BeginUpdate();
G2antt1->DefaultItemHeight = 24;
G2antt1->HeaderHeight = G2antt1->DefaultItemHeight;
G2antt1->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesSolid;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exNoLinesAtRoot;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
	var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesSolid;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->set_FirstVisibleDate(TVariant(0));
	var_Chart->NonworkingDays = 0;
	var_Chart->UnitWidth = 36;
	Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0);
		var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exDay;
		var_Level->Count = 6;
		var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level->set_Label(TVariant("<%i%>"));
		var_Level->FormatLabel = L"'<b>' + ( (value / 6)  array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'";
	Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1);
		var_Level1->set_Label(TVariant("<%i%>"));
		var_Level1->FormatLabel = L"1 + value mod 6 + ` `";
		var_Level1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment;
	var_Chart->AdjustLevelsToBase = true;
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exStartDate,TVariant(0));
	var_Chart->set_ScrollRange(Exg2anttlib_tlb::ScrollRangeEnum::exEndDate,TVariant(95));
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Height = 15;
		var_Bar->Color = RGB(252,213,180);
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption,TVariant("date blocking"));
G2antt1->Columns->Add(L"Company");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("ABC Company"));
	var_Items->set_ItemBackColor(h,RGB(240,240,240));
	G2antt1->Chart->set_ItemBackColor(h,RGB(240,240,240));
	long hChild = var_Items->InsertItem(h,TNoParam(),TVariant("line 1"));
	var_Items->AddBar(hChild,TVariant("Task"),TVariant(0),TVariant(3),TNoParam(),TNoParam());
	hChild = var_Items->InsertItem(h,TNoParam(),TVariant("line 2"));
	var_Items->AddBar(hChild,TVariant("Task"),TVariant(3),TVariant(5),TVariant("A"),TNoParam());
	var_Items->AddBar(hChild,TVariant("Task"),TVariant(7),TVariant(10),TVariant("B"),TNoParam());
	hChild = var_Items->InsertItem(h,TNoParam(),TVariant("line 3"));
	var_Items->AddBar(hChild,TVariant("Task"),TVariant(5),TVariant(8),TVariant("A"),TNoParam());
	var_Items->AddBar(hChild,TVariant("Task"),TVariant(9),TVariant(12),TVariant("B"),TNoParam());
	var_Items->set_ExpandItem(h,true);
G2antt1->EndUpdate();

1733
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate

G2antt1->BeginUpdate();
G2antt1->DefaultItemHeight = 32;
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzB" +
"JLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA="));
	var_Appearance->Add(2,TVariant(String("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8" +
"QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA="));
	var_Appearance->Add(3,TVariant(String("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" +
"ZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA"));
	var_Appearance->Add(4,TVariant(String("gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" +
"ZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB"));
	var_Appearance->RenderType = -16777216;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,164);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->NonworkingDaysColor = RGB(240,240,240);
	var_Chart->NonworkingDaysPattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Height = 17;
		var_Bar->Color = RGB(255,255,255);
		var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(1));
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant(""),TNoParam());
	long h = var_Items->AddItem(TVariant("Task+Rhombus(red)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(100%-11,50%-6,11,11),back=0x10000FF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant(",,5"));
	h = var_Items->AddItem(TVariant("Rhombus(red)+Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,50%-6,11,11),back=0x10000FF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("-5"));
	h = var_Items->AddItem(TVariant("Task(yellow)+Rhombus(blue)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(100%-11,50%-6,11,11),back=0x1FF0000]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant(",,5"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65535));
	h = var_Items->AddItem(TVariant("Rhombus(blue)+Task(yellow)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,50%-6,11,11),back=0x1FF0000]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("-5"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65535));
	h = var_Items->AddItem(TVariant("TriangleUp(white)+Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,50%-6,11,11),back=0x2FFFFFF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("-5"));
	h = var_Items->AddItem(TVariant("TriangleUp(blue)+Task(magenta)+TriangleDown(red)"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("-5,0,5,0"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16744703));
	h = var_Items->AddItem(TVariant("Rhombus+Task+TriangleDown"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("-5, 0,5,0"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16744448));
	h = var_Items->AddItem(TVariant("Rhombus+Task+TriangleDown"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("0,-5,0,5"));
	h = var_Items->AddItem(TVariant("Task+Star"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(100%-11,0,11,11),back=0x4FFFFFF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant(5));
	h = var_Items->AddItem(TVariant("Star+Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(0,100%-11,11,11),back=0x04FFFFFF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant(5));
	h = var_Items->AddItem(TVariant("Task+Star"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant(""),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExt,TVariant("none[(100%-11,0,11,11),back=0x4FFFFFF]"));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarBackgroundExtInflate,TVariant("0,-6,14"));
G2antt1->EndUpdate();

1732
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR") +
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" +
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"));
	var_Appearance->Add(2,TVariant("CP:1 0 0 5 0"));
	var_Appearance->Add(3,TVariant(String("gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZE") +
"iaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3" +
"ZzdOIIJgEgIA="));
	var_Appearance->RenderType = -16777216;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,164);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->Bars->get_Item(TVariant("Task"))->Color = 0x3ff0000;
	var_Chart->Bars->Copy(L"Task",L"NewTask")->Height = 15;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(h,TVariant("NewTask"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("new"),TNoParam());
	h = var_Items->AddItem(TVariant("Task+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	var_Items->AddBar(h,TVariant("NewTask"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("new"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("new"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554687));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	var_Items->AddBar(h,TVariant("NewTask"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("new"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("new"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554687));
	var_Items->set_ItemBar(h,TVariant("new"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus/Color"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33619712));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16711935));
	var_Items->AddBar(h,TVariant("NewTask"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("new"),TNoParam());
	var_Items->set_ItemBar(h,TVariant("new"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33619712));
	var_Items->set_ItemBar(h,TVariant("new"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16711935));
G2antt1->EndUpdate();

1731
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I") +
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" +
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"));
	var_Appearance->Add(2,TVariant("CP:1 -6 0 0 0"));
	var_Appearance->RenderType = -16777216;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,164);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	h = var_Items->AddItem(TVariant("Task+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554687));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus/Color"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33619712));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16711935));
G2antt1->EndUpdate();

1730
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I") +
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" +
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"));
	var_Appearance->Add(2,TVariant("CP:1 -6 0 0 0"));
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,164);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	h = var_Items->AddItem(TVariant("Task+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus/Color"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33619712));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16711935));
G2antt1->EndUpdate();

1729
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IAppearancePtr var_Appearance = G2antt1->VisualAppearance;
	var_Appearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR") +
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" +
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"));
	var_Appearance->Add(2,TVariant("CP:1 0 0 6 0"));
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,164);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Task"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	h = var_Items->AddItem(TVariant("Task+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33554432));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	h = var_Items->AddItem(TVariant("Task/Color+Rhombus/Color"));
	var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarFrameColor,TVariant(33619712));
	var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(16711935));
G2antt1->EndUpdate();

1728
Is it possible to resize a column with the mouse without changing the width of the next column

G2antt1->BeginUpdate();
G2antt1->ColumnAutoResize = false;
G2antt1->Columns->Add(L"Column 1")->Width = 256;
G2antt1->Columns->Add(L"Column 2")->Width = 512;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
G2antt1->EndUpdate();

1727
How can I align captions of items with checkbox, with items with no checkbox

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Default");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_CellImages(TVariant(var_Items->AddItem(TVariant(0))),TVariant(0),TVariant("1"));
	var_Items->set_CellHasCheckBox(TVariant(var_Items->AddItem(TVariant(1))),TVariant(0),true);
	var_Items->set_CellImages(TVariant(var_Items->AddItem(TVariant(2))),TVariant(0),TVariant("1"));
G2antt1->EndUpdate();

1726
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))";
	var_Column->Visible = false;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"Position");
	var_Column1->FormatColumn = L"(1 rpos '') contains '.'";
	var_Column1->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C13 mod 2) != 0",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->ConditionalFormats->Add(L"%C14 = 0",TNoParam())->BackColor = RGB(190,190,190);
G2antt1->EndUpdate();

1725
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

G2antt1->BeginUpdate();
G2antt1->Chart->set_PaneWidth(true,0);
G2antt1->HeaderAppearance = Exg2anttlib_tlb::AppearanceEnum::Etched;
G2antt1->HeaderHeight = 24;
G2antt1->ScrollBySingleLine = true;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines;
G2antt1->Columns->Add(L"Value")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1));
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"FormatColumn = `%0` ~ CellValue");
	var_Column->FormatColumn = L"%0";
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false));
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"FormatColumn = `%C0`~ CellCaption");
	var_Column1->FormatColumn = L"%C0";
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(1.1234));
	var_Items->set_CellValueFormat(TVariant(var_Items->AddItem(TVariant("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."))),TVariant(0),Exg2anttlib_tlb::ValueFormatEnum::exHTML);
	Exg2anttlib_tlb::IEditorPtr var_Editor = var_Items->get_CellEditor(TVariant(var_Items->AddItem(TVariant(3))),TNoParam());
		var_Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::CheckListType;
		var_Editor->AddItem(1,L"Border",TNoParam());
		var_Editor->AddItem(2,L"Thick",TNoParam());
		var_Editor->AddItem(4,L"Shadow",TNoParam());
	var_Items->set_FormatCell(TVariant(var_Items->AddItem(TVariant(10000))),TVariant(0),L"`<b>` + currency(value)");
G2antt1->EndUpdate();

1724
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))";
	var_Column->Visible = false;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"Position");
	var_Column1->FormatColumn = L"(1 rpos '') contains '.'";
	var_Column1->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C13 mod 2) != 0",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->ConditionalFormats->Add(L"%C14 = 0",TNoParam())->BackColor = RGB(190,190,190);
G2antt1->EndUpdate();

1723
How can I highlight each group header, with a different background color (method 2)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->set_ItemBackColor(Item,RGB(190,190,190));
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1722
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))";
	var_Column->Visible = false;
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"Position");
	var_Column1->FormatColumn = L"(1 rpos '') contains '.'";
	var_Column1->Visible = false;
G2antt1->ConditionalFormats->Add(L"%C14 = 0",TNoParam())->BackColor = RGB(190,190,190);
G2antt1->EndUpdate();

1721
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

// Sort event - Fired when the control sorts a column.
void __fastcall TForm1::G2antt1Sort(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"P1");
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true));
	var_Column->PartialCheck = true;
G2antt1->Chart->set_PaneWidth(true,0);
Exg2anttlib_tlb::IColumnPtr var_Column1 = G2antt1->Columns->Add(L"P2");
	var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true));
	var_Column1->PartialCheck = true;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Root 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
	h = var_Items->AddItem(TVariant("Root 2"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"));
	var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"));
	var_Items->set_ExpandItem(h,true);
Exg2anttlib_tlb::IColumnPtr var_Column2 = G2antt1->Columns->Add(L"Position");
	var_Column2->FormatColumn = L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))";
	var_Column2->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C2 mod 2) != 0",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->EndUpdate();

1720
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"1 apos ''";
	var_Column->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C13 mod 5) = 1",TNoParam())->BackColor = RGB(128,128,128);
G2antt1->ConditionalFormats->Add(L"(%C13 mod 5) = 2",TNoParam())->BackColor = RGB(164,164,164);
G2antt1->ConditionalFormats->Add(L"(%C13 mod 5) = 3",TNoParam())->BackColor = RGB(190,190,190);
G2antt1->ConditionalFormats->Add(L"(%C13 mod 5) = 4",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->EndUpdate();

1719
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"1 apos ''";
	var_Column->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C13 mod 4) = 0",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->EndUpdate();

1718
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	G2antt1->Refresh();
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->Chart->set_PaneWidth(false,312);
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->Items->AllowCellValueToItemBar = true;
G2antt1->Columns->get_Item(TVariant(2))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
G2antt1->Columns->get_Item(TVariant(4))->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Position");
	var_Column->FormatColumn = L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))";
	var_Column->Visible = false;
G2antt1->ConditionalFormats->Add(L"(%C13 mod 2) != 0",TNoParam())->BackColor = RGB(240,240,240);
G2antt1->EndUpdate();

1717
How do I show the chart's labels in 24-hour clock format

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 3;
	Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0);
		var_Level->set_Label(TVariant("<%mmm%> <%d%>, <%yyyy%>"));
		var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::exHOutside | Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exDay;
	Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1);
		var_Level1->set_Label(TVariant("<b><%h%>:00</b>"));
		var_Level1->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level1->Unit = Exg2anttlib_tlb::UnitEnum::exHour;
		var_Level1->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelDefaultLine;
		var_Level1->DrawGridLines = true;
	Exg2anttlib_tlb::ILevelPtr var_Level2 = var_Chart->get_Level(2);
		var_Level2->set_Label(TVariant("<%nn%>"));
		var_Level2->Unit = Exg2anttlib_tlb::UnitEnum::exMinute;
		var_Level2->Count = 15;
	var_Chart->ScrollTo(TDateTime(2001,1,1,8,30,00,0).operator double(),TVariant(0));

1716
How do I show the chart's labels in 12-hour clock format

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,0);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double()));
	var_Chart->LevelCount = 3;
	Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0);
		var_Level->set_Label(TVariant("<%mmm%> <%d%>, <%yyyy%>"));
		var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::exHOutside | Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exDay;
	Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1);
		var_Level1->set_Label(TVariant("<b><%h%>:00</b> <%AM/PM%>"));
		var_Level1->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level1->Unit = Exg2anttlib_tlb::UnitEnum::exHour;
		var_Level1->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelDefaultLine;
		var_Level1->DrawGridLines = true;
	Exg2anttlib_tlb::ILevelPtr var_Level2 = var_Chart->get_Level(2);
		var_Level2->set_Label(TVariant("<%nn%>"));
		var_Level2->Unit = Exg2anttlib_tlb::UnitEnum::exMinute;
		var_Level2->Count = 15;
	var_Chart->ScrollTo(TDateTime(2001,1,1,8,30,00,0).operator double(),TVariant(0));

1715
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

// KeyPress event - Occurs when the user presses and releases an ANSI key.
void __fastcall TForm1::G2antt1KeyPress(TObject *Sender,short *   KeyAscii)
{
	OutputDebugString( L"if .Editying != 0 then" );
	OutputDebugString( PChar(G2antt1->Editing) );
	KeyAscii = 0;
}

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	var_Columns->Add(L"Tasks");
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Start");
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
		var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"End");
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
		var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->AllowLinkBars = true;
	var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar;
	var_Chart->LevelCount = 2;
	var_Chart->set_PaneWidth(false,196);
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AllowCellValueToItemBar = true;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2006,9,21).operator double()),TVariant(TDateTime(2006,9,24).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2006,9,22).operator double()),TVariant(TDateTime(2006,9,25).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2006,9,23).operator double()),TVariant(TDateTime(2006,9,26).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1714
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void __fastcall TForm1::G2antt1OverviewZoom(TObject *Sender)
{
	Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
		var_Chart->ScrollTo(TDateTime(2001,1,1).operator double(),TVariant(1));
		OutputDebugString( L"Start" );
		OutputDebugString( PChar(var_Chart->get_StartPrintDate()) );
		OutputDebugString( L"End" );
		OutputDebugString( PChar(var_Chart->get_EndPrintDate()) );
}

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewShowAllVisible;
	var_Chart->AllowOverviewZoom = Exg2anttlib_tlb::OverviewZoomEnum::exAlwaysZoom;
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,L"");
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;
	var_Chart->ScrollTo(TDateTime(2001,1,1).operator double(),TVariant(1));
	var_Chart->MarkTimeZone(TVariant("zone"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,2).operator double()),TVariant(10516548),TNoParam());
G2antt1->Columns->Add(L"Default");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2000,12,15).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(var_Items->AddItem(TVariant("Item 2")),TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TNoParam(),TNoParam());
G2antt1->EndUpdate();

1713
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->LevelCount = 2;
	var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewShowAllVisible;
	var_Chart->AllowOverviewZoom = Exg2anttlib_tlb::OverviewZoomEnum::exAlwaysZoom;
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,L"");
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;

1712
How to sort numerically by columns

G2antt1->BeginUpdate();
G2antt1->Columns->Add(L"Numeric")->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric;
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant(1));
	var_Items->AddItem(TVariant(2));
	var_Items->AddItem(TVariant(12));
	var_Items->AddItem(TVariant(22));
G2antt1->Columns->get_Item(TVariant(0))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1711
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
void __fastcall TForm1::G2antt1MouseDown(TObject *Sender,short   Button,short   Shift,int   X,int   Y)
{
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
}

G2antt1->BeginUpdate();
G2antt1->TreeColumnIndex = -1;
G2antt1->SelForeColor = G2antt1->ForeColor;
Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Buttons");
	var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
	var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasButton,TVariant(true));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->AddItem(TVariant("Button A"));
	var_Items->AddItem(TVariant("Button B"));
	var_Items->AddItem(TVariant("Button C"));
G2antt1->EndUpdate();

1710
How do I arrange the levels when the user changes the scale using the control's overview part

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void __fastcall TForm1::G2antt1OverviewZoom(TObject *Sender)
{
	OutputDebugString( PChar(G2antt1->Chart->UnitScale) );
	G2antt1->EnsureVisibleColumn(TVariant(0));
	Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
		var_Chart->get_Level(0)->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelNoLine;
		var_Chart->ScrollTo(TDateTime(2015,11,18).operator double(),TVariant(1));
}

G2antt1->BeginUpdate();
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2015,11,18).operator double()));
	var_Chart->set_PaneWidth(false,0);
	var_Chart->LevelCount = 2;
	var_Chart->DrawLevelSeparator = Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine;
	Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0);
		var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::exHOutside | Exg2anttlib_tlb::AlignmentEnum::CenterAlignment;
		var_Level->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine;
		var_Level->BackColor = G2antt1->BackColor;
	Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1);
		var_Level1->DrawTickLines = Exg2anttlib_tlb::LevelLineEnum::exLevelMiddleLine | Exg2anttlib_tlb::LevelLineEnum::exLevelDotLine;
		var_Level1->DrawTickLinesFrom(0,Exg2anttlib_tlb::LevelLineEnum::exLevelSolidLine);
	var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewShowAllVisible;
	var_Chart->AllowOverviewZoom = Exg2anttlib_tlb::OverviewZoomEnum::exAlwaysZoom;
	var_Chart->UnitWidth = 24;
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exWeek,L"");
	var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exDay,L"<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096");
	var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay;
	var_Chart->ScrollTo(var_Chart->get_FirstVisibleDate(),TVariant(1));
G2antt1->Columns->Add(L"Default");
G2antt1->EndUpdate();

1709
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
		var_Items->DefineSummaryBars(Item,TVariant(""),-3,TVariant(""));
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1708
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Chart->ShowCollapsedBars = true;
G2antt1->EndUpdate();
G2antt1->Layout = L"multiplesort=\"C1:1\";collapse=\"0-9999\"";

1707
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();
G2antt1->BeginUpdate();
G2antt1->EnsureVisibleColumn(TVariant(0));
G2antt1->Items->set_ExpandItem(0,false);
G2antt1->EndUpdate();

1706
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddGroupItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	G2antt1->Items->set_ExpandItem(Item,false);
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();

1705
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();
G2antt1->EnsureVisibleColumn(TVariant(0));
G2antt1->BeginUpdate();
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_ExpandItem(var_Items->get_RootItem(0),false);
	var_Items->set_ExpandItem(var_Items->get_RootItem(1),false);
	var_Items->set_ExpandItem(var_Items->get_RootItem(2),false);
G2antt1->EndUpdate();

1704
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void __fastcall TForm1::G2antt1AddItem(TObject *Sender,Exg2anttlib_tlb::HITEM   Item)
{
	Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
		var_Items->AddBar(Item,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(2))),TVariant(var_Items->get_CellValue(TVariant(Item),TVariant(4))),TNoParam(),TNoParam());
}

G2antt1->BeginUpdate();
G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(1994,9,1).operator double()));
G2antt1->BackColorSortBar = G2antt1->BackColor;
G2antt1->ColumnAutoResize = false;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Orders"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2antt1->DataSource = (IDispatch*)rs;
G2antt1->SortBarVisible = true;
G2antt1->SortBarCaption = L"Drag a <b>column</b> header here to group by that column.";
G2antt1->AllowGroupBy = true;
G2antt1->Columns->get_Item(TVariant(1))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
G2antt1->EndUpdate();
G2antt1->BeginUpdate();
G2antt1->EnsureVisibleColumn(TVariant(0));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	var_Items->set_ExpandItem(var_Items->FirstVisibleItem,false);
G2antt1->EndUpdate();

1703
How can I move automatically a bar once another is moved ( non-working bars )

G2antt1->BeginUpdate();
G2antt1->MarkSearchColumn = false;
G2antt1->OnResizeControl = Exg2anttlib_tlb::OnResizeControlEnum::exResizeChart;
G2antt1->Columns->Add(L"Tasks");
G2antt1->Columns->Add(L"Start")->Visible = false;
G2antt1->Columns->Add(L"End")->Visible = false;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double()));
	var_Chart->set_PaneWidth(false,64);
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->Add(L"Task:Split");
		var_Bar->Shortcut = L"TSplit";
		var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true));
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Project"));
	var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(TDateTime(2006,9,22).operator double()));
	var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant(TDateTime(2006,10,3).operator double()));
	var_Items->AddBar(h,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(2))),TNoParam(),TNoParam());
	long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1"));
	var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(1))));
	var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(TDateTime(2006,9,26).operator double()));
	var_Items->AddBar(h1,TVariant("TSplit"),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2))),TNoParam(),TNoParam());
	long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2"));
	var_Items->set_CellValue(TVariant(h2),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2))));
	var_Items->set_CellValue(TVariant(h2),TVariant(2),TVariant(TDateTime(2006,9,28).operator double()));
	var_Items->AddBar(h2,TVariant("TSplit"),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2))),TNoParam(),TNoParam());
	var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant(""));
	long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3"));
	var_Items->set_CellValue(TVariant(h3),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2))));
	var_Items->set_CellValue(TVariant(h3),TVariant(2),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(2))));
	var_Items->AddBar(h3,TVariant("TSplit"),TVariant(var_Items->get_CellValue(TVariant(h3),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h3),TVariant(2))),TNoParam(),TNoParam());
	var_Items->AddLink(TVariant("L2"),h2,TVariant(""),h3,TVariant(""));
	var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(7),TNoParam());
	var_Items->GroupBars(h2,TVariant(""),false,h3,TVariant(""),true,TVariant(7),TNoParam());
	var_Items->DefineSummaryBars(h,TVariant(""),h1,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h2,TVariant(""));
	var_Items->DefineSummaryBars(h,TVariant(""),h3,TVariant(""));
	var_Items->set_ExpandItem(h,true);
	var_Items->set_ItemBold(h,true);
G2antt1->EndUpdate();

1702
How can I get notified once the user expands a column

// LayoutChanged event - Occurs when column's position or column's size is changed.
void __fastcall TForm1::G2antt1LayoutChanged(TObject *Sender)
{
	OutputDebugString( L"Column-Expanded" );
	OutputDebugString( PChar(G2antt1->Columns->get_Item(TVariant("C0"))->Expanded) );
}

G2antt1->BeginUpdate();
G2antt1->ShowFocusRect = false;
G2antt1->ColumnAutoResize = false;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"C0");
		var_Column->ExpandColumns = L"0,1,2";
		var_Column->DisplayExpandButton = true;
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Cell 0.0"));
	var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("Cell 0.1"));
	var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("Cell 0.2"));
	h = var_Items->AddItem(TVariant("Cell 1.0"));
	var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("Cell 1.1"));
	var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("Cell 1.2"));
G2antt1->EndUpdate();

1701
I am using expandable headers, the question is how I can display the column itself, not just the child columns

G2antt1->BeginUpdate();
G2antt1->ColumnAutoResize = false;
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
G2antt1->BackColorLevelHeader = G2antt1->BackColor;
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns;
	Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"C0");
		var_Column->ExpandColumns = L"0,1,2";
		var_Column->DisplayExpandButton = true;
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Cell 0.0"));
	var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("Cell 0.1"));
	var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("Cell 0.2"));
	h = var_Items->AddItem(TVariant("Cell 1.0"));
	var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("Cell 1.1"));
	var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("Cell 1.2"));
G2antt1->EndUpdate();